{include file="header.html"}
<style>
select,input{ vertical-align:middle}
</style>
<script type="text/javascript">
    $(function(){
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>
<div id="rightTop">
    <p>财务退款处理</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
             <div class="left">
                <input type="hidden" name="app" value="financial_refund" />
                <input type="hidden" name="act" value="index" />
                <label>状态</label>
                 <select class="querySelect" name="RefundStatus">
                     <option value="">请选择状态</option>
                     {html_options options=$order_status_list selected=$query.RefundStatus}
                 </select>
                 生成时间从:<input class="queryInput" type="text" value="{$query.add_time_from}" id="add_time_from" name="add_time_from" class="pick_date" />
                 至:<input class="queryInput" type="text" value="{$query.add_time_to}" id="add_time_to" name="add_time_to" class="pick_date" />
                 订单号：<input class="queryInput" style="width:200px;" type="text" placeholder="订单号/退款单号/支付单号" name="sn" value="{$sn|escape}" />

                 <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=financial_refund">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">
        {if $refunds}{include file=page.top.html}{/if}
    </div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <tr class="tatr1">
            <td width="20px" class="firstCell"><input type="checkbox" class="checkall" /></td>
            <td>退款单号</td>
            <td class="firstCell"><span>支付单号</span></td>
            <td>订单号</td>
            <td>结算状态</td>
            <td>是否可结算</td>
            <td>供应商ID</td>
            <td>供应商名称</td>
            <td>订单商品数量</td>
            <td>订单商品确认数量</td>
            <td>币种</td>
            <td>订单商品金额</td>
            <td>税金金额</td>
            <td>运费金额</td>
            <td>应退金额</td>
            <td>订单下单时间</td>
            <td>入库时间</td>
            <td>生成时间</td>
            <td>操作</td>
        </tr>
        <!--{foreach from=$res item=vo}-->
        <tr class="tatr2">
            <td class="firstCell"><input type="checkbox" class="checkitem" value="{$vo.id}"/></td>
            <td>{$vo.refund_sn}</td>
            <td class="firstCell">{$vo.strPaymentNo}</td>
            <td>{$vo.OrderNo}</td>
            <td>
                <!--{if $vo.RefundStatus==100}-->
                <span style="color:gray">待确认</span>
                <!--{elseif $vo.RefundStatus==200}-->
                <span style="color:#62B44B">待财务审核</span>
                <!--{elseif $vo.RefundStatus == 201}-->
                <span style="color:#62B44B">待退款</span>
                <!--{elseif $vo.RefundStatus == 300}-->
                <span style="color:#62B44B">已退款</span>
                <!--{/if}-->
            </td>
            <td>
                <!--{if $vo.IsEnabled == 1}-->
                <span style="color:#62B44B">可结算</span>
                <!--{elseif $vo.IsEnabled == 0}-->
                <span style="color:gray">不可结算</span>
                <!--{/if}-->
            </td>
            <td>{$vo.VendorId}</td>
            <td>{$vo.VendorName}</td>
            <td>{$vo.GoodsNum}</td>
            <td>{$vo.ConfirmNum}</td>
            <td>{$vo.Currency}</td>
            <td>{$vo.OrderTotal|price}</td>
            <td>{$vo.TaxTotal|price}</td>
            <td>{$vo.Freight|price}</td>
            <td>{$vo.Total|price}</td>
            <td>{$vo.OrderCreateTime}</td>
            <td>{$vo.StockInTime}</td>
            <td>{$vo.create_time|date:complete}</td>
            <td>
                {if $vo.IsEnabled eq 1 && $vo.RefundStatus eq 200}
                <a href="javascript:drop_confirm('确认要提交到财务么？', 'index.php?app=financial_refund&amp;act=searchRefund&amp;OrderNo={$vo.OrderNo}&amp;id={$vo.id}');">提交到财务</a>
                {elseif $vo.RefundStatus eq 201}
                <a href="javascript:drop_confirm('您确认操作退款吗？', 'index.php?app=financial_refund&amp;act=refund_post&amp;refund_sn={$vo.refund_sn}');">退款</a>

                {elseif $vo.RefundStatus eq 300}
                    已退款
                {elseif $vo.RefundStatus eq 100}
                    待仓库确认
                {/if}
            </td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="11">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $res}-->
    <div id="dataFuncs">
        <div id="batchAction" class="left paddingT15">
            <input class="formbtn batchButton" type="button" value="批量提交财务" name="id" style="width: 100px;" uri="index.php?app=financial_refund&act=batch_finance" presubmit="confirm('您确认提交财务处理么？');" />
            <!--<input class="formbtn batchButton" type="button" style="width: 100px;" value="批量退款" name="id" uri="index.php?app=financial_refund&act=refund_post" presubmit="confirm('您确认退款操作么？');" />-->
        </div>
        <div class="pageLinks">
            {if $res}{include file=page.bottom.html}{/if}
        </div>
    </div>
    <!--{/if}-->
    <div class="clear"></div>
</div>
<script>

</script>
{include file="footer.html"}
